@import "../../styles/var.less";

.vc-mask {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0, 0);
  z-index: 10001;
  -webkit-transition: background .3s;
  transition: background .3s;
  -webkit-tap-highlight-color: transparent;
  overflow-y: scroll;
}

.vc-panel {
  display: none;
  position: fixed;
  min-height: 85%;
  left: 0;
  right: 0;
  bottom: -100%;
  z-index: 10002;
  background-color: var(--VC-BG-0);
  // transition: -webkit-transform .3s;
  // transition: transform .3s;
  // transition: transform .3s, -webkit-transform .3s;
  // -webkit-transition: -webkit-transform .3s;

  // transform: translate(0, 100%);
  // -webkit-transform: translate(0, 100%);

  // use `bottom` instead of `transform` to prevent animation fail in WeChat webview
  transition: bottom .3s;
}

.vc-toggle {

  .vc-switch {
    display: none;
  }

  .vc-mask {
    background: rgba(0, 0, 0, 0.6);
    display: block;
  }

  .vc-panel {
    bottom: 0;
    // -webkit-transform: translate(0, 0);
    // transform: translate(0, 0);
  }
}

// content
.vc-content {
  background-color: var(--VC-BG-2);
  overflow-x: hidden;
  overflow-y: auto;
  position: absolute;
  top: (40em / @font);
  left: 0;
  right: 0;
  bottom: (40em / @font);
  -webkit-overflow-scrolling: touch;
  margin-bottom: constant(safe-area-inset-bottom);
  margin-bottom: env(safe-area-inset-bottom);
}
.vc-content.vc-has-topbar {
  top: (71em / @font);
}
.vc-plugin-box {
  display: none;
  position: relative;
  min-height: 100%;
}
.vc-plugin-box.vc-actived {
  display: block;
}
.vc-plugin-content {
  padding-bottom: (39em / @font) * 2;
  -webkit-tap-highlight-color: transparent;
}
.vc-plugin-empty:before,
.vc-plugin-content:empty:before {
  content: "Empty";
  color: var(--VC-FG-1);
  position: absolute;
  top: 45%;
  left: 0;
  right: 0;
  bottom: 0;
  font-size: (15em / @font);
  text-align: center;
}



// safe area
@supports (bottom: constant(safe-area-inset-bottom)) or (bottom: env(safe-area-inset-bottom)) {
  .vc-toolbar,
  .vc-switch {
    bottom: constant(safe-area-inset-bottom);
    bottom: env(safe-area-inset-bottom);
  }
}
